import request from '@/utils/request'

// 围栏状态修改
export function changeFenchStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/equipment/fence/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询安全围栏列表
export function listFence(query) {
  return request({
    url: '/equipment/fence/list',
    method: 'get',
    params: query
  })
}

// 查询安全围栏详细
export function getFence(id) {
  return request({
    url: '/equipment/fence/' + id,
    method: 'get'
  })
}

// 新增安全围栏
export function addFence(data) {
  return request({
    url: '/equipment/fence',
    method: 'post',
    data: data
  })
}

// 修改安全围栏
export function updateFence(data) {
  return request({
    url: '/equipment/fence',
    method: 'put',
    data: data
  })
}

// 删除安全围栏
export function delFence(id) {
  return request({
    url: '/equipment/fence/' + id,
    method: 'delete'
  })
}
